<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>simple</title>
    <style>
      .main {
        width: 800px;
        height: 400px;
        border: solid 2px red;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 2px;
        justify-items: center;
        align-items: center;
        overflow: auto;
      }
      .item {
        border: solid 3px blue;
        width: 160px;
        height: 140px;
      }
      .card {
        width: 100%;
        height: 100%;
        background-color: blueviolet;
        /* 开启flex布局 */
        display: flex;
        /* 确定主轴方向 */
        flex-direction: column;
        /* 调整主轴排列 */
        justify-content: start;
        /* 交叉轴居中？拉伸 */
        align-items: stretch;
      }
      .picture {
        /* width: 100px; */
        height: 70%;
        /* background-color: cadetblue; */
        background-image: url(filtertestss.png);
        background-size: cover;
      }
      .description {
        /* width: 100px; */
        flex: 1;
        background-color: teal;
        display: flex;
        flex-direction: column;
      }
      .info {
        height: 20px;
        /* flex:1; */
        display: flex;
        justify-content: space-between;
      }
      .op {
        margin-left: 10px;
        height: 10px;
        font-size: 12px;
      }
    </style>
  </head>
  <body>
    <div class="main">
      <div class="item">
        <div class="card">
          <div class="picture"></div>
          <div class="description">
            <div class="info">
              <div class="author">zhangsan</div>
              <div class="time">2021-02-05</div>
            </div>
            <div class="op">
              <div>操作</div>
            </div>
          </div>
        </div>
      </div>
      <div class="item">2</div>
      <div class="item">3</div>
      <div class="item">4</div>
      <div class="item">
        <div class="card">
          <div class="picture"></div>
          <div class="description">
            <div class="info">
              <div class="author">zhangsan</div>
              <div class="time">2021-02-05</div>
            </div>
            <div class="op">
              <div>操作</div>
            </div>
          </div>
        </div>
      </div>
      <div class="item">6</div>
      <div class="item">7</div>
      <div class="item">8</div>
      <div class="item">
        <div class="card">
          <div class="picture"></div>
          <div class="description">
            <div class="info">
              <div class="author">zhangsan</div>
              <div class="time">2021-02-05</div>
            </div>
            <div class="op">
              <div>操作</div>
            </div>
          </div>
        </div>
      </div>
      <div class="item">6</div>
      <div class="item">7</div>
      <div class="item">8</div>
    </div>
  </body>
</html>
